Page({

  /**
   * 页面的初始数据
   */
  data: {
    selectBar: 0,
    queryBar: 0,
    selectMenu: [
      { id: '0', se: '综合排序' },
      { id: '1', se: '获利' },
      { id: '2', se: '胜算率' },
      { id: '3', se: '收益率' },
      { id: '4', se: '跟单人数' },
      { id: '5', se: '交易日期' },
    ],
    queryMenu: [],
    queryMenu1: [
      { id: '0', qu: '最新' },
      { id: '1', qu: '最热' },
      { id: '2', qu: '全部' },
    ],
    queryMenu2: [
      { id: '0', qu: '升序↑' },
      { id: '1', qu: '降序↓' },
      { id: '2', qu: '全部' },
    ],
    queryMenu3: [
      { id: '0', qu: '日获利' },
      { id: '1', qu: '月获利' },
      { id: '2', qu: '总获利' },
    ],
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    that.setData({
      queryMenu: that.data.queryMenu1
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  select: function (e) {
    var that = this;
    var Bar = e.currentTarget.id;
    switch (Bar) {
      case '0':
        that.setData({
          selectBar: 0,
          queryMenu: that.data.queryMenu1
        });
        break;
      case '1':
        that.setData({
          selectBar: 1,
          queryMenu: that.data.queryMenu3
        });
        break;
      case '2':
        that.setData({
          selectBar: 2,
          queryMenu: that.data.queryMenu2
        });
        break;
      case '3':
        that.setData({
          selectBar: 3,
          queryMenu: that.data.queryMenu2
        });
        break;
      case '4':
        that.setData({
          selectBar: 4,
          queryMenu: that.data.queryMenu2
        });
        break;
      case '5':
        that.setData({
          selectBar: 5,
          queryMenu: that.data.queryMenu2
        });
        break;
    }
  },

  query: function (e) {
    var that = this;
    var que = e.currentTarget.id;
    switch (que) {
      case '0':
        that.setData({
          queryBar: 0
        });
        break;
      case '1':
        that.setData({
          queryBar: 1
        });
        break;
      case '2':
        that.setData({
          queryBar: 2
        });
        break;
    }
  },
})